<template>
  <div>
    111111111111
    <p>
      <button @click="goPage2()">跳转到page2</button>
    </p>

    <p>路由的参数prop 静态传递: {{foo}}</p>
  </div>
</template>

<script >
export default {
  props: {
    foo: {
      type: String,
      default: ''
    }
  },
  methods: {
    goPage2() {
      //  this.$router.push('/page2/23/dda')
      this.$router.push({ name: 'page2', params: { id: 22, msg: "dsda" } });
    }
  }
};
</script>

<style lang="scss" scoped>
</style>